package com.itdr.common;

import com.itdr.utils.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: DemoController
 * 日期: 2020/11/14 9:54
 *
 * @author Air张
 * @since JDK 1.8
 */

@RestController
public class DemoController {

    @Autowired
    RedisUtil redisUtil;

    @RequestMapping("/a")
    public void show(){
        redisUtil.set("u","123");
    }

    @RequestMapping("/b")
    public void show2(){
        String u = redisUtil.get("u");
        System.out.println(u);
    }

    @RequestMapping("/c")
    public void show3(){
        redisUtil.remove("u");
    }
}
